package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 考核状态枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2022-11-09
 */
@AllArgsConstructor
@Getter
public enum AssessmentStatusEnum {

    UN_START(0, "未开始"),
    RUNNING(1, "进行中"),
    END(2, "已结束");

    private Integer code;
    private String desc;

    public static AssessmentStatusEnum getByCode(Integer code) {
        AssessmentStatusEnum[] dehydrationEnums = AssessmentStatusEnum.values();
        for (AssessmentStatusEnum anEnum : dehydrationEnums) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
